package spring5.aopanno;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Aspect
@Order(1) //设定增强类的优先级，越小代表越先执行
public class PersonProxy {

    //后置通知
    @AfterReturning(value = "execution(* spring5.aopanno.User.add(..))")
    public void personBefore() {
        System.out.println("PersonBefore....");
    }
}
